package com.tjec.project.system.service;

import com.tjec.framework.web.domain.TreeSelect;
import com.tjec.framework.web.domain.TreeSelectAndChildrenNum;
import com.tjec.project.businessWorkbench.domain.BmsBusiness;
import com.tjec.project.system.domain.BmsMdBusinessCategory;
import com.tjec.project.system.domain.vo.BmsMdBusinessCategoryVO;

import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * 业务类别管理Service接口
 *
 * @author tjec
 * @date 2020-04-03
 */
public interface IBmsMdBusinessCategoryService {
    /**
     * 查询业务类别管理
     *
     * @param id 业务类别管理ID
     * @return 业务类别管理
     */
    public BmsMdBusinessCategory selectBmsMdBusinessCategoryById(String id);
    
    /**
     * 查询业务类别管理
     *
     * @param id 业务类别管理ID
     * @return 业务类别管理
     */
    public BmsMdBusinessCategory selectBmsMdBusinessCategoryByGuIdLimit(String guid);

    /**
     * 查询业务类别管理列表
     *
     * @param bmsMdBusinessCategory 业务类别管理
     * @return 业务类别管理集合
     */
    public List<BmsMdBusinessCategory> selectBmsMdBusinessCategoryList(BmsMdBusinessCategory bmsMdBusinessCategory);

    /**
     * 新增业务类别管理
     *
     * @param bmsMdBusinessCategory 业务类别管理
     * @return 结果
     */
    public int insertBmsMdBusinessCategory(BmsMdBusinessCategory bmsMdBusinessCategory);

    /**
     * 修改业务类别管理
     *
     * @param bmsMdBusinessCategory 业务类别管理
     * @return 结果
     */
    public int updateBmsMdBusinessCategory(BmsMdBusinessCategory bmsMdBusinessCategory);

    /**
     * 批量删除业务类别管理
     *
     * @param ids 需要删除的业务类别管理ID
     * @return 结果
     */
    public int deleteBmsMdBusinessCategoryByIds(String[] ids);

    /**
     * 删除业务类别管理信息
     *
     * @param id 业务类别管理ID
     * @return 结果
     */
    public int deleteBmsMdBusinessCategoryById(String id);

    /**
     * 构建前端所需要树结构
     *
     * @param businessCategories 部门列表
     * @return 树结构列表
     */
    public List<BmsMdBusinessCategory> buildBusinessTree(List<BmsMdBusinessCategory> businessCategories);
    
    /**
     * 构建前端所需要树结构
     *
     * @param businessCategories 部门列表
     * @return 树结构列表
     */
    public List<BmsMdBusinessCategoryVO> buildBusinessTreeNew(List<BmsMdBusinessCategoryVO> businessCategories);

    /**
     * 构建前端所需要下拉树结构
     *
     * @param businessCategories 业务类别列表
     * @return 下拉树结构列表
     */
    public List<TreeSelect> buildBusinessTreeSelect(List<BmsMdBusinessCategory> businessCategories);
    
    public List<TreeSelect> buildBusinessTreeSelectNew(List<BmsMdBusinessCategoryVO> businessCategories);

    /**
     * 构建前端所需要下拉树结构
     *
     * @param businessCategorys 业务类别列表
     * @param filter            是否进行过滤
     * @return 下拉树结构列表
     */
    List<TreeSelectAndChildrenNum> buildBusinessTreeSelectAndChildrenNum(List<BmsMdBusinessCategory> businessCategorys, Boolean filter);





    List<BmsMdBusinessCategory> selectBusinessCategoryAndChildrenNumList(BmsMdBusinessCategory bmsMdBusinessCategory, String tableName);

    /**
     * 构建前端所需要下拉树结构
     *
     * @param businessCategory 业务类别列表
     * @param name            表名
     * @return 下拉树结构列表
     */
    List<BmsMdBusinessCategory> selectBusinessCategorySelectOneToMore(BmsMdBusinessCategory businessCategory, String name);

    List<TreeSelectAndChildrenNum> buildBusinessTreeSelectAndChildrenNum(List<BmsMdBusinessCategory> businessCategorys);
    
    public List<String> selectBusinessIds(String userId);
    
    public List<TreeSelectAndChildrenNum> selectFunOptions();

    /**
     * 查询工程招标及工程招标子类
     * @return
     */
    public Set<String> selectEngineeringBidding();

    public Set<String> selectGuidByParentId(String menuName, String parentId);
    
    public Integer checkAgency(String businessTypeId);
}
